package com.jycj.java.study;

public class Teacher {

    private int tId;

    //编写类的基本属性 成员变量
    private String name;


    //重载打招呼的方式  成员方法
    public void say() {
        System.out.println("你好!");
    }

    public void say(int tId) {
        System.out.println("你好，我的id是:" + tId);
    }

    public void say(int tId, String name) {
        System.out.println("你好,我的id是:" + tId + ",我的名字是:" + name);
    }

    public Teacher(int tId, String name) {
        this.tId = tId;
        this.name = name;
        say(this.tId,this.name);
    }

    public Teacher() {
        say();
    }

    public static void main(String[] args) {
        new Teacher();
        new Teacher(1001,"去码头搞点薯条");
        new Teacher(1002,"去码头搞点饼干!");
    }

}

